// 获取设备分类列表
import request from '@/utils/request.ts'
import type {deviceplanquery,addeditPlanType,dowmFormType,deleteQuery,delayQuery} from './type.ts'
// 设备详情
export const deviceDetail = function(id:string){
	return request(`/spray/mini/v1/equipment/${id}`,'GET')
}
// 保养设备
export const MaintenanceFn = function (data: string) {
	return request(`/spray/mini/v1/equipment/${data}/maintenance`,'POST')
}
// 设备计划详情
export const deviceplanDetail = function(data:deviceplanquery){
	return request(`/spray/mini/v1/equipment/${data.equipmentId}/configuration`,'GET',data)
}
// 设备计划延时
export const devicePlanDelayFn = function (data: delayQuery) {
	return request(`/spray/mini/v1/equipment/${data.equipmentId}/delay`,'POST',data)
}
// 设备计划删除
export const deldevicePlan = function (data:deleteQuery) {
	return request(`/spray/mini/v1/equipment/${data.equipmentId}/configuration/${data.planId}`,'DELETE')
}
// 新增编辑设备计划
export const deviceplanEdit = function (data: addeditPlanType) {
	return request(`/spray/mini/v1/equipment/${data.equipmentId}/configuration`,'POST',data)
}
// 编辑计划状态
export const editPlanStatus = function (data: any) {
	return request(`/spray/mini/v1/equipment/plan/status`,'POST',data)
}
// (高级页面设备编辑)
export const devlceEditFn = function (data: dowmFormType) {
	return request(`/spray/mini/v1/equipment/${data.equipmentId}`,'POST',data)
}

// 高级设备列表
export const advancedDeviceList = function (equipmentId: any) {
	return request(`/spray/mini/v1/equipment/scenes/${equipmentId}`,'GET')
}
// 场景设备编辑
export const sceneDeviceEdit = function (data: any) {
	return request(`/spray/mini/v1/equipment/scene/${data.equipmentId}`,'POST',data)
}
// 场景设备删除
export const sceneDeviceDel = function (sceneId: any) {
	return request(`/spray/mini/v1/equipment/scene/${sceneId}`,'DELETE')
}